class Father:
    age = 18
    __sex = "man"
    def say():
        print("hello")


class Son(Father):
    pass

print(Son.age)#18
Son.say()#hello
print(Son._Father__sex)#man

#**********************变量覆盖***********************

class Father1:
    age = 18
    __sex = "man"
    def say():
        print("hello")


class Son1(Father1):
    """
        子类的同名变量会覆盖掉父类继承来的
    """
    age = 25
    """
        注意：私有变量不是覆盖
        因为私有变量的全名为_类名__变量名
        所以本质上不同名
    """
    __sex = "woman"
    pass
#25
print(Son1.age)